#!/bin/bash

mvn -Dmaven.test.skip=true -U clean package -pl feign-provider -am

if [ $? -eq 0 ]
then
    echo "====== feign-provider maven build SUCCESS ======"
else
    echo "!!!!!! feign-provider maven build FAIL !!!!!!"
    exit 1
fi

rm provider_docker/feign-provider.tar.gz

tar -zcvf feign-provider.tar.gz feign-provider/target/feign-provider-0.0.1-SNAPSHOT.jar provider_docker/start.sh

mv feign-provider.tar.gz provider_docker/
